﻿Imports MySql.Data
Imports MySql.Data.MySqlClient
Public Class Conexion
    Public conexion As New MySqlConnection
    Public Sub conectar()
        Try
            conexion.ConnectionString() = ("Server=127.0.0.1;Database=CWM;uid=root;pwd=123456").ToString
            ''If conexion.State = ConnectionState.Closed Then conexion.Open()
            conexion.Open()
        Catch ex As Exception
            '' MsgBox("Error" + ex.ToString)
        End Try
    End Sub

    Public Sub cerrar()
        conexion.Close()
    End Sub
End Class
